home *** CD-ROM | disk | FTP | other *** search
- XCOMM $XConsortium: bsdLib.rules,v 1.1 94/03/29 15:34:45 gildea Exp $
-
- /*
- * NetBSD/FreeBSD shared library rules
- */
-
- #ifndef HasSharedLibraries
- #define HasSharedLibraries YES
- #endif
- #ifndef ForceNormalLib
- #define ForceNormalLib YES
- #endif
- #ifndef SharedDataSeparation
- #define SharedDataSeparation NO
- #endif
- #ifndef SharedCodeDef
- #define SharedCodeDef
- #endif
- #ifndef SharedLibraryDef
- #define SharedLibraryDef -DBSDSHLIB
- #endif
- #ifndef ShLibIncludeFile
- #define ShLibIncludeFile <bsdLib.tmpl>
- #endif
- #ifndef SharedLibraryLoadFlags
- #define SharedLibraryLoadFlags -Bshareable
- #endif
- #ifndef PositionIndependentCFlags
- #define PositionIndependentCFlags -fpic
- #endif
-
- /*
- * InstallSharedLibrary - generate rules to install the shared library.
- */
- #ifndef InstallSharedLibrary
- #define InstallSharedLibrary(libname,rev,dest) @@\
- install:: Concat(lib,libname.so.rev) @@\
- MakeDir($(DESTDIR)dest) @@\
- $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest
- @@\
-
- #endif /* InstallSharedLibrary */
-
- /*
- * SharedCplusplusLibraryTarget - generate rules to create a shared C++
- * library; use $(CXXLINK) instead of $(LD) in case the library needs
- * global constructors to be called.
- *
- * Not tested yet; send any bug fixes to fresco@x.org.
- */
- #ifndef SharedCplusplusLibraryTarget
- #define SharedCplusplusLibraryTarget(libname,rev,solist,down,up,need_libs) @@\
- AllTarget(Concat(lib,libname.so.rev)) @@\
- @@\
- Concat(lib,libname.so.rev): solist @@\
- $(RM) $@ @@\
- $(CXXLINK) -o $@ $(SHLIBLDFLAGS) solist need_libs @@\
- @@\
- clean:: @@\
- $(RM) Concat(lib,libname.so.rev)
-
- #endif /* SharedCplusplusLibraryTarget */
-
- /*
- * NormalSharedLibraryTarget - generate rules to create a shared library;
- * build it into a different name so that the we do not hose people by having
- * the library gone for long periods.
- */
- #ifndef SharedLibraryTarget
- #define SharedLibraryTarget(libname,rev,solist,down,up) @@\
- AllTarget(Concat(lib,libname.so.rev)) @@\
- @@\
- Concat(lib,libname.so.rev): solist @@\
- $(RM) $@~ @@\
- (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\
- $(RM) $@ @@\
- $(MV) $@~ $@ @@\
- LinkBuildLibrary($@) @@\
- @@\
- clean:: @@\
- $(RM) Concat(lib,libname.so.rev)
-
- #endif /* SharedLibraryTarget */
-
- /*
- * SharedLibraryDataTarget - generate rules to create shlib data file;
- */
- #ifndef SharedLibraryDataTarget
- #define SharedLibraryDataTarget(libname,rev,salist)
- #endif /* SharedLibraryDataTarget */
-
- #ifndef InstallSharedLibraryData
- #define InstallSharedLibraryData(libname,rev,dest)
- #endif /* InstallSharedLibraryData */
-
- /*
- * SharedLibReferences - variables for shared libraries
- */
- #ifndef SharedLibReferences
- #define SharedLibReferences(varname,libname,libsource,revname,rev) @@\
- revname = rev @@\
- Concat3(DEP,varname,LIB) = SharedLibDependencies(libname,libsource,revname) @@\
- Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) @@\
- LintLibReferences(varname,libname,libsource)
- #endif
-
- /*
- * SharedDSLibReferences - variables for shared libraries
- */
- #ifndef SharedDSLibReferences
- #define SharedDSLibReferences(varname,libname,libsource,revname,rev) @@\
- revname = rev @@\
- Concat3(DEP,varname,LIB) = SharedDSLibDependencies(libname,libsource,revname) @@\
- Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) Concat3(Shared,libname,Reqs) @@\
- LintLibReferences(varname,libname,libsource)
- #endif
-